<?php

/**
 * Recurso filter form base class.
 *
 * @package    siscampanha
 * @subpackage filter
 * @author     Alexandre Haguiar
 */
abstract class BaseRecursoFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'origem'          => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'origem'          => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('recurso_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Recurso';
  }

  public function getFields()
  {
    return array(
      'id'              => 'Number',
      'tipo_recurso_id' => 'ForeignKey',
      'campanha_id'     => 'ForeignKey',
      'origem'          => 'Text',
      'doador_id'       => 'ForeignKey',
    );
  }
}
